#ifndef SCENE_H
#define SCENE_H

// gl includes
#include "gl\glew.h"
#include "gl\wglew.h"
#include "gl\GL.h"

// image loading
#include "Image\IMAGE.h"

// deformable object
#include "DeformableMesh.h"

enum RenderingMode {
	RENDERING_MODE_POINT,
	RENDERING_MODE_TRIANGLES
};

class Scene
{
public:
	Scene( const char* objFile, char* bumpFile, bool linearDeformation );
	~Scene( void );

	inline GLuint getBufferId() const
	{
		return bufferId;
	}

	void update( float dt );
	void draw();

	inline DeformableMesh& getModel()
	{
		return model;
	}

	RenderingMode getRenderingMode() const { return renderingMode; }
	void setRenderingMode( RenderingMode renderingMode ) { this->renderingMode = renderingMode; }

	//void changeDeformationMode();
	
	//void moveVertex( int vertexIndex, float dx, float dy );

protected:
	DeformableMesh model;
	float* modelBuffer;

	//int numberOfTriangles;
	int numberOfVertices;

	RenderingMode renderingMode;

	IMAGE img;
	GLuint bufferId;

	void generateModelBuffer();
};

#endif